#include <ros/ros.h>
#include <std_msgs/String.h>

int main(int argc, char *argv[])
{
    ros::init(argc, argv, "hello_world_node");
    ros::NodeHandle nh;
    ros::Publisher pub = nh.advertise<std_msgs::String>("helloworld", 10);
    ros::Rate rate(2);

    int count = 0;

    while(ros::ok())
    {
        std_msgs::String msg;
        std::stringstream stream;

        stream << "Hello world " << count++;
        msg.data = stream.str();

        pub.publish(msg);
        rate.sleep();
    }

    return 0;
}